<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    #box{
      width: 200px;
      height: 200px;
      margin: 50px auto;
      background-color: rgb(158, 53, 53);
    }
  </style>
</head>
<body>
  <div id="app">
    <button @click="showHide">{{isShow?'消失':"显示"}}</button>
    <div id="box" v-show="isShow"></div>
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      el: '#app',
      data: {
        isShow: true
      },
      methods: {
        showHide () {
          this.isShow = !this.isShow;
        }
      }
    })
  </script>
</body>
</html>